package gold.digger;

/**
 * Created by fanzhenyu02 on 2020/2/25.
 */
public class LC5440 {


    public int xorOperation(int n, int start) {
        int res = start;
        for (int i = 1; i < n; i++) {
            start += 2;
            res = res ^ start;
        }

        return res;
    }

    public static void main(String[] args) {
        LC5440 an = new LC5440();
        System.out.println(an.xorOperation(5, 0));
    }


}
